package com.hello.web.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;


/**
 * 权限表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("t_permission")
@Entity(name = "t_permission")
@org.hibernate.annotations.Table(appliesTo = "t_permission", comment = "权限表")
public class PermissionDO {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "权限名称")
    private String name;

    @ApiModelProperty(value = "权限ICON")
    private String icon;

    @ApiModelProperty(value = "权限路径")
    private String path;

    @ApiModelProperty(value = "父级权限id")
    private Long parentId;

    @ApiModelProperty(value = "权限类型 1为父节点 2为子节点")
    private Integer type;

    @ApiModelProperty(value = "权限标识")
    private String checkValue;

    @ApiModelProperty(value = "排序")
    private Integer sort;

}